<html>
<head>
    <title>Ansible Application</title>
</head>
<body>
    </br>
        <a href=http://{{ ansible_default_ipv4.address }}/index.html>Homepage</a>
    </br>

<?php 
    Print "Hello, World! I am a web server configured using Ansible and I am : ";
    echo exec('hostname');
    Print  "</BR>";
    echo  "List of Databases: </BR>";
    $link = mysqli_connect('localhost', '{{ dbuser }}', '{{ upassword }}') or die(mysqli_connect_error($link));
    $res = mysqli_query($link, "SHOW DATABASES;");
    while ($row = mysqli_fetch_assoc($res)) {
        echo $row['Database'] . "</BR>";
    }
?>

</body>
</html>
